package com.bzyd.cloud.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * 测试RocketMQ监听器
 * Created by Xianyue Dang on 2021/8/20
 */
@Slf4j
@Service
@RocketMQMessageListener(consumerGroup = "tx_producer_group", topic = "tx_topic")
public class ScoreServiceRocketMQListener implements RocketMQListener<String> {


    @Override
    public void onMessage(String message) {
        log.info("模拟积分系统收到消息：{}", message);
    }
}
